package GUI;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPanel;
import java.awt.Dimension;

public class VentanaPrincipal 
{

	public panelInicio fondo;
	public ventanaComandos panelControl;
	
	private JFrame principal;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					VentanaPrincipal window = new VentanaPrincipal();
					window.principal.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public VentanaPrincipal() 
	{
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		principal = new JFrame();
		principal.setBounds(150, 0,1017,700);
		principal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		principal.getContentPane().setLayout(null);
				
				
				final JButton btnNewButton = new JButton("Ingresar al sitio");
				btnNewButton.setBounds(730, 345, 150, 23);
				principal.getContentPane().add(btnNewButton);
				btnNewButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent arg0) 
					{
					
						panelControl = new ventanaComandos();
						panelControl.setVisible(true);
						principal.setVisible(false);
					}
				});
				
				
		
		
		//		Agrego panel de fondo
				this.fondo = new panelInicio();
				fondo.setMinimumSize(new Dimension(0, 0));
				this.fondo.setSize(1027, 660);
				this.fondo.setLocation(0, 0);
				principal.getContentPane().add(fondo);
				fondo.setVisible(true);
	}
}
